<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<title>毕业设计项目</title>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<script type="text/javascript" src="../../js/jquery-1.9.0.js"></script>
<link href="../../css/style.css" rel="stylesheet" type="text/css">
<script src="../../script/common.js"></script>
</head>
<body>

<div class="page_title">客户信息管理 > 客户信息 > 联系人 > 新建联系人</div>
<div class="button_bar">
	<button class="common_button" onclick="help('');">帮助</button>
	<button class="common_button" onclick="back();">返回</button>
	<button class="common_button" onclick="insertLinkmen()">保存</button>
</div>
<table class="query_form_table">
	<tr>
		<th>姓名</th>
		<td><input name="lkmName" /><span class="red_star">*</span></td>
		<th>性别</th>
		<td>
			<input type="radio" name="lkmSex" value="男" checked />男
			<input type="radio" name="lkmSex" value="女" />女
		</td>
	</tr>
	<tr>
		<th>职位</th>
		<td><input name="lkmPostion" value="" /><span class="red_star">*</span></td>
		<th>办公电话</th>
		<td><input name="lkmTel" value="" /><span class="red_star">*</span></td>
	</tr>	
	<tr>
		<th>手机</th>
		<td><input name="lkmMobile" value="" size="20" /></td>
		<th>备注</th>
		<td><input name="lkmMemo" value="" size="20" /></td>
	</tr>
</table>
</body>
</html>
<script type="text/javascript">
	function insertLinkmen() {
		var lkmName=$("input[name=lkmName]").val();
		var lkmSex=$("input[name=lkmSex]:checked").val();
		var lkmPostion=$("input[name=lkmPostion]").val();
		var lkmTel=$("input[name=lkmTel]").val();
		var lkmMobile=$("input[name=lkmMobile]").val();
		var lkmMemo=$("input[name=lkmMemo]").val();
        $.ajax({
            url: "/CstLinkman/insertCstLinkman",
            type: 'GET',
            data: {
                "lkmName": lkmName,
                "lkmSex": lkmSex,
                "lkmPostion": lkmPostion,
                "lkmTel": lkmTel,
                "lkmMobile": lkmMobile,
                "lkmMemo": lkmMemo
            },
            dataType: 'json',
            contentType: "application/json;charset=utf-8",
            success: function (i) {
                if (i>0){
                    alert("保存成功");
                    window.history.back();
				}
            }
        });
    }
</script>